/*
 * XML Type:  InvestmentStatementRequestMessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.InvestmentStatementRequestMessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML InvestmentStatementRequestMessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class InvestmentStatementRequestMessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractRequestMessageSetImpl implements net.ofx.types.x2003.x04.InvestmentStatementRequestMessageSetV1
{
    
    public InvestmentStatementRequestMessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName INVSTMTTRNRQ$0 = 
        new javax.xml.namespace.QName("", "INVSTMTTRNRQ");
    private static final javax.xml.namespace.QName INVMAILTRNRQ$2 = 
        new javax.xml.namespace.QName("", "INVMAILTRNRQ");
    private static final javax.xml.namespace.QName INVMAILSYNCRQ$4 = 
        new javax.xml.namespace.QName("", "INVMAILSYNCRQ");
    
    
    /**
     * Gets array of all "INVSTMTTRNRQ" elements
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest[] getINVSTMTTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVSTMTTRNRQ$0, targetList);
            net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest[] result = new net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest getINVSTMTTRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest)get_store().find_element_user(INVSTMTTRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVSTMTTRNRQ" element
     */
    public int sizeOfINVSTMTTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVSTMTTRNRQ$0);
        }
    }
    
    /**
     * Sets array of all "INVSTMTTRNRQ" element
     */
    public void setINVSTMTTRNRQArray(net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest[] invstmttrnrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invstmttrnrqArray, INVSTMTTRNRQ$0);
        }
    }
    
    /**
     * Sets ith "INVSTMTTRNRQ" element
     */
    public void setINVSTMTTRNRQArray(int i, net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest invstmttrnrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest)get_store().find_element_user(INVSTMTTRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invstmttrnrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest insertNewINVSTMTTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest)get_store().insert_element_user(INVSTMTTRNRQ$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest addNewINVSTMTTRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentStatementTransactionRequest)get_store().add_element_user(INVSTMTTRNRQ$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVSTMTTRNRQ" element
     */
    public void removeINVSTMTTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVSTMTTRNRQ$0, i);
        }
    }
    
    /**
     * Gets array of all "INVMAILTRNRQ" elements
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionRequest[] getINVMAILTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVMAILTRNRQ$2, targetList);
            net.ofx.types.x2003.x04.InvestmentMailTransactionRequest[] result = new net.ofx.types.x2003.x04.InvestmentMailTransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionRequest getINVMAILTRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionRequest)get_store().find_element_user(INVMAILTRNRQ$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVMAILTRNRQ" element
     */
    public int sizeOfINVMAILTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVMAILTRNRQ$2);
        }
    }
    
    /**
     * Sets array of all "INVMAILTRNRQ" element
     */
    public void setINVMAILTRNRQArray(net.ofx.types.x2003.x04.InvestmentMailTransactionRequest[] invmailtrnrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invmailtrnrqArray, INVMAILTRNRQ$2);
        }
    }
    
    /**
     * Sets ith "INVMAILTRNRQ" element
     */
    public void setINVMAILTRNRQArray(int i, net.ofx.types.x2003.x04.InvestmentMailTransactionRequest invmailtrnrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionRequest)get_store().find_element_user(INVMAILTRNRQ$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invmailtrnrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionRequest insertNewINVMAILTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionRequest)get_store().insert_element_user(INVMAILTRNRQ$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVMAILTRNRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailTransactionRequest addNewINVMAILTRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailTransactionRequest)get_store().add_element_user(INVMAILTRNRQ$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVMAILTRNRQ" element
     */
    public void removeINVMAILTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVMAILTRNRQ$2, i);
        }
    }
    
    /**
     * Gets array of all "INVMAILSYNCRQ" elements
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncRequest[] getINVMAILSYNCRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVMAILSYNCRQ$4, targetList);
            net.ofx.types.x2003.x04.InvestmentMailSyncRequest[] result = new net.ofx.types.x2003.x04.InvestmentMailSyncRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVMAILSYNCRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncRequest getINVMAILSYNCRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncRequest)get_store().find_element_user(INVMAILSYNCRQ$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVMAILSYNCRQ" element
     */
    public int sizeOfINVMAILSYNCRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVMAILSYNCRQ$4);
        }
    }
    
    /**
     * Sets array of all "INVMAILSYNCRQ" element
     */
    public void setINVMAILSYNCRQArray(net.ofx.types.x2003.x04.InvestmentMailSyncRequest[] invmailsyncrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invmailsyncrqArray, INVMAILSYNCRQ$4);
        }
    }
    
    /**
     * Sets ith "INVMAILSYNCRQ" element
     */
    public void setINVMAILSYNCRQArray(int i, net.ofx.types.x2003.x04.InvestmentMailSyncRequest invmailsyncrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncRequest)get_store().find_element_user(INVMAILSYNCRQ$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invmailsyncrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVMAILSYNCRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncRequest insertNewINVMAILSYNCRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncRequest)get_store().insert_element_user(INVMAILSYNCRQ$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVMAILSYNCRQ" element
     */
    public net.ofx.types.x2003.x04.InvestmentMailSyncRequest addNewINVMAILSYNCRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentMailSyncRequest target = null;
            target = (net.ofx.types.x2003.x04.InvestmentMailSyncRequest)get_store().add_element_user(INVMAILSYNCRQ$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVMAILSYNCRQ" element
     */
    public void removeINVMAILSYNCRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVMAILSYNCRQ$4, i);
        }
    }
}
